Skip to content

Udemy/Ts/section2/21 #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Sep 1, 2024
Merged

Udemy/Ts/section2/21 #25

merged 26 commits into from
Sep 1, 2024

Conversation

4BFC
Copy link
Member

@4BFC 4BFC commented Sep 1, 2024

✍Udemy/Ts/section2/21

본 PR은 청강 1회독을 마친 후 N회독으로 작성된 PR입니다.

🔗Reference

🔥KeyWord

  • Any Type

📝Description

  • Any Type
    • 🚩: any타입을 학습하고 실습했다
    • Any는 어떤 타입이든 허용하는 타입이다. 어떻게 보면 유연하다고 느껴지질지 모르겠지만 TypeScript의 장점을 전혀 활용하지 못하기에 좋은 방법은 아니다. Any로 타입을 지정한 배열에 마구잡이로 서로 다른 타입을 넣어도 아무런 에러가 일어나지 않는다. 이는 결국 일반적인 js를 사용하는 것과 다른 바가 없다.
      • Any의 반환 값
        • Any의 반환 값은 아무것도 없다. 반환되는 값이 무엇인지 판단하지 않는다.
      • Any의 장점
        • Any 타입은 코드상의 특정 라인에 문제가 없다고 TypeScript를 안심시킨다는 목적 단지 하나 때문에 긴 타입을 새로 정의하고 싶지 않을 때 유용하게 사용할 수 있다.

📌Summary

  • 아직 Any를 유용하게 사용하는 방법을 경험하진 않았지만 실제로 TypeScript로 프로젝트를 하면서 Any를 사용해본 경험이 많지 않다. 굳이 있다면 타입 추론으로 문제가 발생 될 때 간혹 Any를 넣어서 어디에 있는 타입이 문제인지 진단하기 위해서 사용해본 경험이 전부이다.

4BFC and others added 25 commits August 27, 2024 01:50
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 작성한 커밋입니다.
Github에서 작성한 커밋입니다.
Github에서 수정한 커밋입니다.
Github에서 수정한 커밋입니다.
@4BFC 4BFC added the 2회독 회독 label Sep 1, 2024
@4BFC 4BFC added this to the Udemy:TypeScript milestone Sep 1, 2024
@4BFC 4BFC self-assigned this Sep 1, 2024
@4BFC 4BFC merged commit 8ce9575 into UdemyTs Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2회독 회독
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant